package com.giraffe.device.api;

import com.giraffe.common.core.constant.ServiceNameConstants;
import com.giraffe.device.api.factory.DeviceFallbackFactory;
import com.giraffe.device.pojo.dto.DeviceDTO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * 设备服务
 * 
 * @author ruoyi
 */
@FeignClient(contextId = "deviceService", value = ServiceNameConstants.DEVICE_SERVICE, fallbackFactory = DeviceFallbackFactory.class)
public interface DeviceService {

    @GetMapping(value = "/api/device/v1/getDevice")
    public DeviceDTO getDevice(@RequestParam("deviceId") String deviceId);

    @PostMapping(value = "/api/device/v1/setDeviceStatus")
    public Boolean setDeviceStatus(@RequestBody DeviceDTO dto);
}
